package com.hm.cms.domain;

import java.util.Date;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.hm.cms.auto.su.BaseDomain;
import com.hm.cms.auto.su.R;
import com.hm.cms.def.AdvertSiteEnum;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 2017年10月21日 上午10:43:46
 * @version 1.0
 * @describe
 */
@Setter
@Getter
@Document(collection = R.Database.prefix + "ADVERT")
@CompoundIndexes({ @CompoundIndex(name = "advert_site,status", def = "{'advert_site': 1, 'status': 1}") })
public class AdvertDomain extends BaseDomain {

	private static final long serialVersionUID = 1L;

	/**
	 * 广告雇主
	 */
	@Field(value = "ad_employer")
	private String adEmployer;

	/**
	 * 广告描述
	 */
	@Field(value = "ad_note")
	private String adNote;

	/**
	 * 广告位置
	 */
	@Field(value = "advert_site")
	private AdvertSiteEnum advertSite;

	/**
	 * 广告内容
	 */
	@Field(value = "ad_content")
	private String adContent;

	/**
	 * 有效时间
	 */
	@Field(value = "valid_date")
	private Date validDate;

	/**
	 * 展示顺序
	 */
	@Field(value = "ad_order")
	private Integer adOrder;
}
